package com.crr.controller;

import com.crr.common.bean.ResultBean;
import com.crr.common.controller.BaseController;
import com.crr.service.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "产品管理")
@RestController
@RequestMapping("/v1")
public class ProductController extends BaseController {
    @Autowired
    ProductService productService;
    @ApiOperation("查询产品列表")
    @GetMapping("/product/query")
    public ResultBean queryAll(){
        List list = productService.queryAll();
        return success("产品列表",list);

    }

}
